package com.ruoyi.project.mydy.movieimage.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.project.mydy.movieimage.mapper.DlMovieImageMapper;
import com.ruoyi.project.mydy.movieimage.domain.DlMovieImage;
import com.ruoyi.project.mydy.movieimage.service.IDlMovieImageService;
import com.ruoyi.common.utils.text.Convert;

/**
 * 影片图集Service业务层处理
 * 
 * @author mhg
 * @date 2021-10-07
 */
@Service
public class DlMovieImageServiceImpl implements IDlMovieImageService 
{
    @Autowired
    private DlMovieImageMapper dlMovieImageMapper;

    /**
     * 查询影片图集
     * 
     * @param id 影片图集主键
     * @return 影片图集
     */
    @Override
    public DlMovieImage selectDlMovieImageById(Long id)
    {
        return dlMovieImageMapper.selectDlMovieImageById(id);
    }

    /**
     * 查询影片图集列表
     * 
     * @param dlMovieImage 影片图集
     * @return 影片图集
     */
    @Override
    public List<DlMovieImage> selectDlMovieImageList(DlMovieImage dlMovieImage)
    {
        return dlMovieImageMapper.selectDlMovieImageList(dlMovieImage);
    }

    /**
     * 新增影片图集
     * 
     * @param dlMovieImage 影片图集
     * @return 结果
     */
    @Override
    public int insertDlMovieImage(DlMovieImage dlMovieImage)
    {
        dlMovieImage.setCreateTime(DateUtils.getNowDate());
        return dlMovieImageMapper.insertDlMovieImage(dlMovieImage);
    }

    /**
     * 修改影片图集
     * 
     * @param dlMovieImage 影片图集
     * @return 结果
     */
    @Override
    public int updateDlMovieImage(DlMovieImage dlMovieImage)
    {
        return dlMovieImageMapper.updateDlMovieImage(dlMovieImage);
    }

    /**
     * 批量删除影片图集
     * 
     * @param ids 需要删除的影片图集主键
     * @return 结果
     */
    @Override
    public int deleteDlMovieImageByIds(String ids)
    {
        return dlMovieImageMapper.deleteDlMovieImageByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除影片图集信息
     * 
     * @param id 影片图集主键
     * @return 结果
     */
    @Override
    public int deleteDlMovieImageById(Long id)
    {
        return dlMovieImageMapper.deleteDlMovieImageById(id);
    }
}
